<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title></title>
	<script id="tpl" type="text/html">
	    {{each email as value i}} 
		 	<li>{{value}}</li> 
		{{/each}} 
	</script>

</head>
<body>
<div>
	<ul id="test"></ul>
</div>
<script src="./jquery-3.2.1.js"></script>
<script src="./template.js"></script>
<script src="http://mockjs.com/dist/mock.js"></script>
<script>

	$(function(){
		Mock.mock('http://g.cn', {
			'email': ['@EMAIL','@EMAIL','@EMAIL','@EMAIL','@EMAIL']
		});

		$.ajax({
		    url: 'http://g.cn',
		    type: 'get',
    		
		}).done(function(data, status, xhr){
			var data = JSON.parse(data);
			
			var html = template('tpl',data);
			$('#test').html(html);
		})
	})
		
</script>
</body>
</html>